package io.renren.modules.sell.entity;/**
 * @auther MR.M
 * @date 2019/5/2-13:11
 */

import cn.hutool.core.util.EnumUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.renren.modules.sell.enums.ProductStatusEnum;
import io.renren.modules.sell.util.Date2LongSerializer;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 *@ClassName ProductInfo
 *@Descripyion TODO
 *@Author mengjiafeng
 *@Date 2019/5/2 13:11
 *@Version 1.0
 **/
@Data
public class ProductInfo {
    @TableId(type = IdType.AUTO)
    private Long productId;
    private Long sellerId;
    //名字
    private String productName;
    //单价
    private BigDecimal productPrice;
    //库存
    private Integer productStock;
    //描述
    private String productDescription;
    //小图
    private String productIcon;
    //状态，0正常，1下架
    private String productStatus;
    //类目编号
    private Integer categoryType;

    private Date createTime;

    @TableField(update ="now()")
    private Date updateTime;

//    @JsonIgnore
//    public ProductStatusEnum getProductStatusEnum(){
//        return EnumUtil.getByCode(productStatus,ProductStatusEnum.class);
//    }





}
